package com.mouse.hxsj.util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtil {
    public static String toDateStr(Date date){
        return toDateStr(date,"yyyy-MM-dd HH:mm:ss");
    }
    public static String toDateStr(Date date,String pattern){
        SimpleDateFormat formatter = new SimpleDateFormat(pattern);
        return formatter.format(new Date());
    }
}
